export function useDefer(maxFrameCount = 100) {
    const frameCount = 0
    const refreshFrameCount = () => {
        requestAnimationFrame(() => {
            frameCount++
            if (frameCount < maxFrameCount) {
                refreshFrameCount()
            }
        })
    }
    refreshFrameCount()
    return function (showInframeCount) {
        return frameCount >= showInframeCount
    }
}